﻿using System.Web.Mvc;
using InvoiceInvoker.Logic.Repositories;

namespace InvoiceInvoker.MvcUI.Helpers
{
	public static class ControllerHelpers
	{
		public static void SetSellerId(this Controller controller)
		{
			if (controller.Session["SellerId"] == null)
				controller.Session["SellerId"] = new RegisteredSellerRepository().GetIdByUserName(controller.User.Identity.Name);
		}
	}
}